package jhavelogger.models;

import jhavelogger.visitor.LogVisitor;

public class UidOperation extends JHaveLog {
    private int uid;

    /**
     * Specifies that an operation is about to be performed by this UID Example
     * log: 2/1/08 1:12 AM - INFO: /srv/www/htdocs/jhave/html_root/uid/4126 *
     * 
     * @param uid
     */
    public UidOperation(String source, int uid) {
	this.setLogSource(source);
	this.setUid(uid);
    }

    /**
     * @param uid
     *            the uid to set
     */
    public void setUid(int uid) {
	this.uid = uid;
    }

    /**
     * @return the uid
     */
    public int getUid() {
	return uid;
    }

    @Override
    public Object accept(LogVisitor visitor) {
	return visitor.visit(this);
    }
    
    @Override
    public String toString() {
	return "Uid Operation on " + this.getLogSource() + ". UID: " + this.getUid();
    }
}
